package cn.edu.zzuli.model.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

@ApiModel("用户实体")
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("user")
public class User {
    @TableId(value = "uid", type = IdType.AUTO)
    private Integer uid;

    @ApiModelProperty("昵称")
    private String nickName;

    @ApiModelProperty("性别")
    private String gender;

    @ApiModelProperty("是否被锁定")
    private Integer locked;

    @ApiModelProperty("微信openid")
    private String openId;

    @ApiModelProperty("积分")
    private Double wealth;

    @ApiModelProperty("头像")
    private String avatarUrl;

    @ApiModelProperty("是否验证")
    private Integer state;

    @ApiModelProperty("签到提醒")
    private Integer signIn;

    @ApiModelProperty("token令牌")
    @TableField(exist = false)
    private String token;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @TableField(fill = FieldFill.INSERT)
    private Date createTime;

    //@TableLogic
    @ApiModelProperty("逻辑删除")
    private Integer deleted;

    public User(Integer uid,Integer state){
        this.uid = uid;
        this.state = state;
    }
}
